-
-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add svi part iv tutorial #2770
add svi part iv tutorial #2770
Conversation
this is very much a work in progress rough draft, but if anyone has suggestions for tips/tricks i should cover please feel free to make a suggestion @fritzo @eb8680 @fehiepsi @ordabayevy |
Looks great! Here are some comments: Comments on existing sections
Additional material
|
This is great! Some comments on some existing sections:
Some suggestions for new sections:
|
It looks great! Some practical suggestions:
def save_checkpoint(path_param, path_optim):
# save only if there are no NaN or Inf values
for k, v in pyro.get_param_store().items():
if torch.isnan(v).any() or torch.isinf(v).any():
raise ValueError(f"Detected NaN or Inf values in {k}")
# save parameters and optimizer state
pyro.get_param_store().save(path_param)
self.optim.save(path_optim)
def load_checkpoint(path_param, path_optim):
pyro.clear_param_store()
pyro.get_param_store().load(path_param, map_location=self.device)
self.optim.load(path_optim)
|
I'm vaguely planning to created a dedicated tutorial on implementing custom distributions. Before that, I'd like to create more automated testing tools along the lines of goftests #2658. |
@fritzo @eb8680 @ordabayevy thanks for your feedback! i've tried to incorporate what seemed in scope (basically things related to optimization). this is now ready for review. please check links and let me know if you can think of additional content that might be worth adding that's in scope |
Final comments:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we should push this to the website as soon as it's merged!
as long promised... nbviewer link